#! /usr/bin/python
# coding: utf-8

from Tkinter import *

root = Tk()

def printSize(event):
    print (event.width, event.height)

root.bind('<Configure>', printSize)

root.mainloop()
